package com.paw.ruoyi.admin.common.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author lvzihai
 * @date 2022/1/19
 **/
@Data
public class BaseEntity implements Serializable {


  @TableField(value = "f_create_by", fill = FieldFill.INSERT)
  private String createBy;

  @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
  @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
  @TableField(value = "f_create_time", fill = FieldFill.INSERT)
  private Date createTime;


  @TableField(value = "f_update_by", fill = FieldFill.INSERT_UPDATE)
  private String updateBy;


  @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
  @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
  @TableField(value = "f_update_time", fill = FieldFill.INSERT_UPDATE)
  private Date updateTime;

  @TableLogic
  @TableField(value = "f_yn")
  private Integer yn;

  @TableField(value = "f_remark")
  private String remark;




  @TableField(exist = false)
  private Map<String, Object> params = new HashMap();

}
